package com.alibaba.algo.cooperation.usercomponent.service.user;

import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.common.PagerEntity;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.DeleteOrgAndPositionReqVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SaveEmployeeRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SelectEmployeeDetailRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SelectEmployeeListRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.UpdateEmployeeRequestVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 类SysEmployeeService.java的实现描述：员工 service
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
@FeignClient(url="${feign.userCenterUrl:}", value = "usercenter-service", contextId = "usercenter-app")
public interface SysEmployeeService {

    @RequestMapping(value = "/sysEmployee/insert", method = RequestMethod.POST)
    BaseResult insert(@RequestBody SaveEmployeeRequestVO vo);

    @RequestMapping(value = "/sysEmployee/update", method = RequestMethod.POST)
    BaseResult update(@RequestBody UpdateEmployeeRequestVO vo);

    @RequestMapping(value = "/sysEmployee/selectPage", method = RequestMethod.POST)
    PagerEntity selectPage(@RequestBody SelectEmployeeListRequestVO vo);

    @RequestMapping(value = "/sysEmployee/selectPageByIds", method = RequestMethod.POST)
    PagerEntity selectPageByIds(@RequestBody SelectEmployeeListRequestVO vo);

    @RequestMapping(value = "/sysEmployee/delete", method = RequestMethod.POST)
    BaseResult delete(@RequestBody List<Long> employeeIdList);

    @RequestMapping(value = "/sysEmployee/revalidate", method = RequestMethod.POST)
    BaseResult revalidate(@RequestBody List<Long> employeeIdList);

    @RequestMapping(value = "/sysEmployee/orgAndPosition/delete", method = RequestMethod.POST)
    BaseResult deleteOrgAndPosition(@RequestBody List<DeleteOrgAndPositionReqVO> deleteOrgAndPositionReqVOList);

    @RequestMapping(value = "/sysEmployee/selectOrgAndPosition", method = RequestMethod.POST)
    BaseResult qryOrgAndPosition(@RequestBody SelectEmployeeDetailRequestVO vo);

    @RequestMapping(value = "/sysEmployee/import", method = RequestMethod.POST)
    BaseResult importBatch(MultipartFile file);

    @RequestMapping(value = "/sysEmployee/deleteEmployeePosOrgRelByMid", method = RequestMethod.POST)
    BaseResult deleteEmployeePosOrgRelByMid(@RequestBody String mid);
}
